#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.basic.module.user.mapper;


import ${package}.common.bean.po.Tree;
import ${package}.common.bean.po.User;
import ${package}.common.bean.vo.QueryBean;
import ${package}.common.bean.vo.UpdateUserVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Description: 无法补充
 *
 * @author wupanhua
 * @date 2019/8/6 15:28
 *
 * <pre>
 *              ${copyright}
 *      Copyright (c) 2019. All Rights Reserved.
 * </pre>
 */
@Repository
public interface UserMapper {

    /**
     * Description:
     * <根据用户id和查询用户信息>
     * @author ywh
     * @date 11:26 2019/8/7
     * @param user 1
     * @return User
     **/
    User findUserByUserIdAndPassword(User user);

    /**
     * Description:
     * <查询所有用户>
     * @author ywh
     * @date 11:27 2019/8/7
     * @return java.util.List<User>
     **/
    List<User> findAllUser();

    /**
     * Description:
     * <根据email和密码查询用户>
     * @author ywh
     * @date 11:27 2019/8/7
     * @param user 1
     * @return User
     **/
    User findUserByEmailAndPassword(User user);

    /**
     * Description:
     * <更新用户最后登录时间>
     * @author ywh
     * @date 11:27 2019/8/7
     * @param user 1
     **/
    void updateLastLoginDate(User user);

    /**
     * Description:
     * <根据用户名查询用户>
     * @author ywh
     * @date 11:28 2019/8/7
     * @param username 1
     * @return User
     **/
    User selectByUserName(String username);

    /**
     * Description:
     * <获得用户列表>
     * @author wupanhua
     * @date 11:28 2019/8/7
     * @param queryBean 1
     * @return java.util.List<User>
     **/
    List<User> queryUserList(QueryBean queryBean);

    /**
     * Description:
     * <新增用户>
     * @author wupanhua
     * @date 11:28 2019/8/7
     * @param user 1
     **/
    void addUser(User user);

    /**
     * Description:
     * <根据用户主键删除用户>
     * @author wupanhua
     * @date 11:29 2019/8/7
     * @param id 1
     **/
    void deleteUserByUserId(Long id);

   /**
    * Description:
    * <将用户的状态置为已删除>
    * @author zhangwy
    * @date 11:29 2019/8/7
    * @param id 1
    **/
    void updateUserStatusDeleteById(Long id);

    /**
     * Description:
     * <修改用户状态>
     * @author pig
     * @date 11:29 2019/8/7
     * @param id 用户id
     * @param status 状态码
     **/
    void updateUserStatus(@Param("id") Long id, @Param("status") Integer status);

    /**
     * Description:
     * <根据id查询用户>
     * @author pig
     * @date 11:30 2019/8/7
     * @param id 1
     * @return User
     **/
    User queryUserById(Long id);

    /**
     * Description:
     * <根据id修改用户信息>
     * @author pig
     * @date 11:31 2019/8/7
     * @param user 1
     **/
    void updateUserById(UpdateUserVo user);

    /**
     * Description:
     * <根据用户主键重置密码>
     * @author pig
     * @date 11:31 2019/8/7
     * @param defaultPassword 1
     * @param keys 2
     **/
    void resetUserPassByKey(@Param("defaultPassword") String defaultPassword, @Param("keys") Long[] keys);

    /**
     * Description:
     * <将用户状态置为删除>
     * @author pig
     * @date 11:31 2019/8/7
     * @param keys 1
     **/
    void updateUsersStatusDeleteByKeys(List<Long> keys);

    /**
     * Description:
     * <根据账户查询用户>
     * @author pig
     * @date 11:32 2019/8/7
     * @param username 1
     * @return java.util.List<User>
     **/
    List<User> findUserByUserId(String username);

    /**
     * Description:
     * <根据用户账号查询用户时筛除传来的id数据>
     * @author 周婷婷
     * @date 11:32 2019/8/7
     * @param user 1
     * @return java.util.List<User>
     **/
    List<User> findUserByNameOrNotInId(User user);

    /**
     * Description:
     * <根据主键更新用户头像>
     * @author pig
     * @date 11:33 2019/8/7
     * @param id 1
     * @param path 2
     **/
    void updateUserIconByKey(@Param("id") Long id, @Param("path") String path);

    /**
     * Description:
     * <获取用户树>
     * @author yangliu
     * @date 11:34 2019/8/7
     * @return java.util.List<Tree>
     **/
    List<Tree> getUserTree();

    /**
     * Description:
     * <物理删除用户>
     * @author 周婷婷
     * @date 11:34 2019/8/7
     * @param id 1
     **/
    void deleteUser(Long id);
}
